<?php

class modifExposition extends Controller {


	function index()
	{
		$this->load->database();
		$this->load->library('form_validation');
		$this->load->helper('form');
		$this->load->helper('url');
		
		$data;
		
		$id=$this->input->post('selectNomExpo');
		
		if($id !=0){
		
		$query = $this->db->query('SELECT nom,presentation,descriptif, date_debut,date_fin,adresse,code_postal,ville,pays FROM exposition where ID_Exposition ='.$id);

		$row = $query->row();
		
			$data["nom"]=$row->nom;
			$data["descriptif"]=$row->descriptif;
			$data["presentation"]=$row->presentation;
			$data["date_debut"]=$row->date_debut;
			$data["date_fin"]=$row->date_fin;
			$data["adresse"]=$row->adresse;
			$data["code_postal"]=$row->code_postal;
			$data["ville"]=$row->ville;
			$data["pays"]=$row->pays;
			$this->load->view('modifExposition',$data);
		
		}
		else $this->load->view('modifExposition');
		
		
		
	}
	
	
}
?>
